FROM docker.elastic.co/beats/filebeat:7.9.3
#COPY kibana/filebeat.yml /usr/share/filebeat/filebeat.yml
COPY config/filebeat.yml /usr/share/filebeat/filebeat.yml
USER root
RUN chown root:filebeat /usr/share/filebeat/filebeat.yml

RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo 'Asia/Shanghai' >/etc/timezone

COPY scripts/entrypoint.sh /usr/share/filebeat/bin/entrypoint.sh

CMD ["sh", "/usr/share/filebeat/bin/entrypoint.sh"]